import { _decorator, Component, Node, tween, UIOpacity, director } from "cc";
const { ccclass, property } = _decorator;

@ccclass("Start")
export class Start extends Component {
    @property(Node)
    private tips: Node = null;

    start() {
        tween()
            .target(this.tips.getComponent(UIOpacity))
            .to(1.0, { opacity: 255 })
            .delay(5.0)
            .to(1, { opacity: 0 })
            .call(() => {
                director.loadScene("home");
            })
            .start();
    }
}
